/**
 *
 * @author Alex & Umit
 */
public class TNode implements Position {

    private Object elem;
    private TNode parent;
    private TNode left;
    private TNode right;

    //Not finished
    public TNode(Object el, TNode pt, TNode lt, TNode rt)
    {
        elem = el;
        parent = pt;
        left = lt;
        right = rt;
    }

    public void setElem(Object e)
    {
        elem = e;
    }

    public void setParent(TNode pt)
    {
        parent = pt;
    }

    public void setLeft(TNode lt)
    {
        left = lt;
    }

    public void setRight(TNode rt)
    {
        right = rt;
    }
   

    //Not finished
    public Object element()
    {
        return elem;
    }

    public TNode parent()
    {
        return parent;
    }

    public TNode left()
    {
        return left;
    }

    public TNode right()
    {
        return right;
    }

    public String toString()
    {
        return "<TNode(" + elem + ")>" ;
    }

}
